package com.vhuomai.product.home.mapper;

import com.vhuomai.mybatis.mapper.auto.AutoMapper;
import com.vhuomai.product.home.dto.HomeEntranceResult;
import com.vhuomai.product.home.entity.BaseHomeEntrance;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface HomeEntranceMapper extends AutoMapper<BaseHomeEntrance, Integer> {
    @Select("select e.*, s.url as link_url "
        + "from base_home_entrance e "
        + "left join base_sys_link s on s.id = e.link_id "
        + "order by e.entrance_order")
    List<HomeEntranceResult> findByMerchantNo(@Param("merchantNo") Integer merchantNo);
}
